package com.yl.chainStore.services

import com.yl.chainStore.entity.system.CompanyDictionary
import com.yl.chainStore.entity.system.CompanyDictionaryDetail
import com.yl.chainStore.pojo.vo.company.CompanyDictionaryDetailUpdateVo
import com.yl.common.control.ResponseBody

/**
 * @description :公司字典
 * @author :吴枫
 * @create :2021-07-06 14:34:00
 */
interface ICompanyDictionaryService {

    /**
     * 修改公司字典
     */
    fun updateDictionary(dict: CompanyDictionary):ResponseBody

    /**
     * 删除公司字典
     */
    fun deleteDictionary(id:Long):ResponseBody

    /**
     * 根据id查询单个字典
     */
    fun selectDictionaryById(id:Long):ResponseBody

    /**
     * 给字典添加一个值
     */
    fun addDetail(detail: CompanyDictionaryDetail):ResponseBody

    /**
     * 删除一个值
     */
    fun delDetailByDetailId(detailId:Long):ResponseBody

    /**
     * 修改值
     */
    fun updateDetail(vo: CompanyDictionaryDetailUpdateVo):ResponseBody

    /**
     * 查询某个公司，某个字典组的详情
     */
    fun getCompanyDetailList(distId:Long,companyId:Long,subCompanyId:Long):List<CompanyDictionaryDetail>

    /**
     * 查询某个公司，某个字典组的详情 id:itemValue name:name
     */
    fun getCompanyDetailListToMap(dictId:Long,companyId:Long,subCompanyId:Long):List<Map<String, Any>>

    /**
     * 查询某个公司，某个字典组的详情 id:id name:name
     */
    fun getCompanyDetailListToMapIdName(dictId:Long,companyId:Long,subCompanyId:Long):List<Map<String, Any>>

    /**
     * 单个的值
     */
    fun getDetail(detailId:Long):CompanyDictionaryDetail?

}
